﻿<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>报表系统</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    {% load i18n admin_urls static admin_modify simpletags%}

    <script src="{% static 'webreport/CreateControl.js' %}" type="text/javascript"></script>
    <script src="{% static 'webreport/GRInstall.js' %} " type="text/javascript"></script>
    <script type="text/javascript">
        Install_InsertReport();
        CreateReport("Report");
    </script>
</head>
<body>
<div id="content-main" class="form-main">
zhijiedayin

</div>
    <script type="text/javascript">
	    var Installed = Install_Detect();

    </script>


<script type="text/javascript">

    // 直接使用后端序列化好的JSON字符串
    var reportData = {{ data_json|safe }};  // 使用|safe过滤器避免转义

    {#InsertPrintViewer({#}
    {#report: urlAddRandomNo("{{ MEDIA_URL }}{{ report }}"),#}
    {#data: reportData,#}
    {#});#}
        // 对包含中文的URL进行编码处理
var reportUrl = "{{ MEDIA_URL }}{{ report }}";
// 对URL进行编码，解决中文乱码问题
var encodedUrl = encodeURI(reportUrl);
         Report.LoadFromURL(urlAddRandomNo(encodedUrl))


        Report.LoadDataFromXML(JSON.stringify(reportData))

          Report.Print(true);


        window.close()




   </script>





</body>
</html>
